package cn.tjnext.apply.web.model;

import java.io.Serializable;

public class BaseModel implements Serializable {
    private static final long serialVersionUID = -5195513189278096801L;

    protected boolean hasError = false;
    protected boolean hasInfo = false;
    protected boolean needLogin = false;
    protected String errorMessage;
    protected String infoMessage;

    public BaseModel() {
        init();
    }

    public BaseModel(String errorMessage) {
        this.hasError = true;
        this.hasInfo = false;
        this.errorMessage = errorMessage;
        this.infoMessage = "";
    }

    protected void init() {
        this.hasError = false;
        this.hasInfo = false;
        this.errorMessage = "";
        this.infoMessage = "";
    }

    public boolean isHasError() {
        return hasError;
    }

    public void setHasError(boolean hasError) {
        this.hasError = hasError;
    }

    public boolean isHasInfo() {
        return hasInfo;
    }

    public void setHasInfo(boolean hasInfo) {
        this.hasInfo = hasInfo;
    }

    public boolean isNeedLogin() {
        return needLogin;
    }

    public void setNeedLogin(boolean needLogin) {
        this.needLogin = needLogin;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    public String getInfoMessage() {
        return infoMessage;
    }

    public void setInfoMessage(String infoMessage) {
        this.infoMessage = infoMessage;
    }
}
